home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / Procedural / AMReminder / Dispatcher.c < prev    next >
Text File  |  1996-03-19  |  3KB  |  151 lines

  1. /* Dispatcher.c -- dispatcher for windows and for modeless dialogs */
  2. /* Created 01/01/95 12:01 PM by AppMaker */
  3.  
  4. #include <Types.h>
  5. #include <Quickdraw.h>
  6. #include <Controls.h>
  7. #include <Dialogs.h>
  8. #include <Events.h>
  9. #include <Lists.h>
  10. #include <Menus.h>
  11. #include <TextEdit.h>
  12. #include "MainWindow.h"
  13. #include "Globals.h"
  14. #include "Dispatcher.h"
  15.  
  16. /*----------*/
  17. void DoIdle (void)
  18. {
  19. } /*DoIdle*/
  20.  
  21. /*----------*/
  22. void OpenWindows    (FSSpec*        fileSpec,
  23.                      short            fRefNum)
  24. {
  25.  
  26.     OpenMainWindow (fileSpec, fRefNum);
  27.  
  28. } /*OpenWindows*/
  29.  
  30. /*----------*/
  31. void CloseCurWindow (void)
  32. {
  33.     switch (cur->windowKind) {
  34.         case WMainWindow:
  35.                 CloseMainWindow ();
  36.             break;
  37.  
  38.     } /*switch*/
  39. } /*CloseCurWindow*/
  40.  
  41. /*----------*/
  42. void DoControl        (ControlHandle    whichControl,
  43.                      short            whichPart,
  44.                      Point            where)
  45. {
  46.     switch (cur->windowKind) {
  47.         case WMainWindow:
  48.                 ControlMainWindow (whichControl, whichPart, where);
  49.             break;
  50.  
  51.     } /*switch*/
  52. } /*DoControl*/
  53.  
  54. /*----------*/
  55. void MouseInContent    (Point        where,
  56.                      short        modifiers)
  57. {
  58.     switch (cur->windowKind) {
  59.         case WMainWindow:
  60.                 MouseInMainWindow (where, modifiers);
  61.             break;
  62.  
  63.     } /*switch*/
  64. } /*MouseInContent*/
  65.  
  66. /*----------*/
  67. void TypeInWindow    (char    ch)
  68. {
  69.     switch (cur->windowKind) {
  70.         case WMainWindow:
  71.                 TypeInMainWindow (ch);
  72.             break;
  73.  
  74.     } /*switch*/
  75. } /*TypeInWindow*/
  76.  
  77. /*----------*/
  78. void UpdateContent (void)
  79. {
  80.     switch (cur->windowKind) {
  81.         case WMainWindow:
  82.                 UpdateMainWindow ();
  83.             break;
  84.  
  85.     } /*switch*/
  86. } /*UpdateContent*/
  87.  
  88. /*----------*/
  89. void ActivateContent (Boolean    activate)
  90. {
  91.     switch (cur->windowKind) {
  92.         case WMainWindow:
  93.                 ActivateMainWindow (activate);
  94.             break;
  95.  
  96.     } /*switch*/
  97. } /*ActivateContent*/
  98.  
  99. /*----------*/
  100. void ResizeContent (void)
  101. {
  102.     switch (cur->windowKind) {
  103.         case WMainWindow:
  104.                 ResizeMainWindow ();
  105.             break;
  106.  
  107.     } /*switch*/
  108. } /*ResizeContent*/
  109.  
  110. /*----------*/
  111. pascal void ScrollWindow    (short        newValue,
  112.                              short        oldValue)
  113. {
  114.     switch (cur->windowKind) {
  115.         case WMainWindow:
  116.                 ScrollMainWindow (newValue, oldValue);
  117.             break;
  118.  
  119.     } /*switch*/
  120. } /*ScrollWindow*/
  121.  
  122. /*----------*/
  123. void InitModelessDialogs (void)
  124. {
  125.  
  126. } /*InitModelessDialogs*/
  127.  
  128. /*----------*/
  129. void CloseModelessDialog (DialogPtr        whichDialog)
  130. {
  131.  
  132. } /*CloseModelessDialog*/
  133.  
  134. /*----------*/
  135. Boolean FilterModeless    (DialogPtr        whichDialog,
  136.                          EventRecord    *event,
  137.                          short            *itemHit)
  138. {
  139.  
  140.     return (false);
  141. } /*FilterModeless*/
  142.  
  143. /*----------*/
  144. void DoModelessItem        (DialogPtr        whichDialog,
  145.                          short            itemNr)
  146. {
  147.  
  148. } /*DoModelessItem*/
  149.  
  150. /* Dispatcher */
  151.